﻿<sdk:ChildWindow xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:dark="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.ExpressionDark"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                 mc:Ignorable="d"
                 Title="Edit Pages"
                 x:Class="ComicTool.EditPages" Style="{StaticResource cw}" Width="640" Height="480">
    <dark:ExpressionDarkTheme>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition  Height="Auto" />
                <RowDefinition />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Border BorderThickness="0,0,0,3"
                    Margin="5"
                    BorderBrush="White">
                <TextBlock Text="{Binding Comic.Name}"
                           FontSize="18.667" />
            </Border>
            <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <TextBlock Text="Current Pages"
                           Margin="5"
                           VerticalAlignment="Center"
                           HorizontalAlignment="Left" />
                <ListBox x:Name="pages"
                         ItemsSource="{Binding Comic.Pages}"
                         ItemTemplate="{StaticResource ComicPageListBoxItem}"
                         MinHeight="90"
                         ItemsPanel="{StaticResource ComicPageListBoxPanel}" Grid.Row="1" />
                <Grid Grid.Row="2">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Button VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Click="Button_Click_3"
                            Margin="5">
                        <Image Source="/ComicTool;component/Icons/Previous_48x48.png"
                               Height="16"
                               Width="16" />
                    </Button>
                    <TextBlock Text="Reorder Selected Page"
                               Grid.Column="1"
                               VerticalAlignment="Center"
                               HorizontalAlignment="Center"
                               Margin="5" />
                    <Button Grid.Column="2"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Margin="5"
                            Click="Button_Click_4">
                        <Image Source="/ComicTool;component/Icons/Next_48x48.png"
                               Height="16"
                               Width="16" />
                    </Button>
                    <Button MinWidth="75"
                            Margin="5"
                            Click="Button_Click"
                            Content="Delete"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Right"
                            Grid.Column="3" />
                </Grid>
            </Grid>
            <Border BorderThickness="0,0,0,3"
                    Grid.Row="2"
                    Margin="10"
                    BorderBrush="White"></Border>
            <Grid Grid.Row="3">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <TextBlock Text="Deleted Pages"
                           Margin="5"
                           VerticalAlignment="Center"
                           HorizontalAlignment="Center" />
                <Button MinWidth="75"
                        Margin="5"
                        Click="Button_Click_1"
                        Content="UnDelete"
                        Grid.Column="1"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center" />
                <ListBox x:Name="deletedPages"
                         ItemsSource="{Binding Comic.DeletedPages}"
                         ItemTemplate="{StaticResource ComicPageListBoxItem}"
                         MinHeight="90"
                         Grid.ColumnSpan="2"
                         Grid.Row="1" ItemsPanel="{StaticResource ComicPageListBoxPanel}" />
            </Grid>
            <Grid Grid.Row="4"
                  Grid.ColumnSpan="3"
                  VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Button MinWidth="75"
                        Margin="5"
                        Command="{Binding SavePDFCommand}"
                        Content="Export to PDF" />
                <Button Content="OK"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Right"
                        MinWidth="75"
                        Margin="5"
                        Click="Button_Click_2"
                        Grid.Column="1" />
            </Grid>
        </Grid>
    </dark:ExpressionDarkTheme>
</sdk:ChildWindow>